import Vue from 'vue'
import Router from 'vue-router'
import Home from '../view/home'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: "*",
      redirect: "/404"
    },
    {
      path:'/404',
      name:'Name',
      component: resolve => require(['../components/404.vue'], resolve)
    },
    {
      path:'/',
      name:'Home',
      component:Home
    },
    {
      path: '/home',
      redirect: '/',
    },
    {
      path: '/login',
      name: 'Login',
      component: resolve => require(['../components/goToLogin.vue'], resolve)
    },
    {
      path:'/classlist',
      name:'ClassList',
      component:resolve => require(['../view/classList.vue'], resolve)
    },
    {
      path:'/shoplist',
      name:'ShopList',
      component:resolve => require(['../view/shopList.vue'], resolve)
    },
    {
      path:'/shopInfo',
      name:'ShopInfo',
      component:resolve => require(['../view/shopInfo.vue'], resolve)
    },
    {
      path:'/car',
      name:'ShopCar',
      component:resolve => require(['../view/shopCar.vue'], resolve)
    },
    {
      path:'/listAction',
      name:'ListAction',
      component:resolve => require(['../view/listAction.vue'], resolve)
    },
    {
      path:'/order',
      name:'Order',
      component:resolve => require(['../view/order.vue'], resolve)
    },
    {
      path:'/comment',
      name:'Comment',
      component:resolve => require(['../view/comment.vue'], resolve)
    },
    {
      path:'/study',
      name:'Study',
      component:resolve => require(['../view/study.vue'], resolve)
    },
    {
      path:'/match',
      name:'Match',
      component:resolve => require(['../view/match.vue'], resolve)
    }
  ]
})
